#include "buzzer.h"


// PC9 ---- buzzer
void buzzer_init(void)
{
    RCC->APB2ENR |= (unsigned int)0x1 << (4 * 1); // GPIOC初始化
    
    GPIOC->CRH &= ~((unsigned int)0xF << (1 * 4)); // 清除默认配置
    GPIOC->CRH |= (unsigned int)0x3 << (1 * 4); // 推挽输出,50Mhz
    // 输出高电平
    buz_h(); // 输出高电平
}
